//
//  ToDoVC.swift
//  SelfTodo
//
//  Created by panda on 17/3/17.
//  Copyright © 2017年 panda. All rights reserved.
//

import UIKit

class ToDoVC: UIViewController {

    override func viewDidLoad() {
        super.viewDidLoad()

        // Do any additional setup after loading the view.
        title = "Edit ToDo"
        
        view.addSubview(datePick)
        view.addSubview(titleTF)
        view.addSubview(doneBtn)
        
        addConstraint()
        
    }
    
    private func addConstraint() {
        
    }
    
    
    @objc private func doneBtnAciton(sender: UIButton) {
        
    }

    // MARK: - 懒加载
    fileprivate lazy var datePick: UIDatePicker = {
       let date = UIDatePicker()
//        date.
        return date
    }()
    
    fileprivate lazy var titleTF : UITextField = {
        let tf = UITextField()
        
        return tf;
    }()
    
    fileprivate lazy var doneBtn : UIButton = {
        let btn = UIButton(type: UIButtonType.custom)
        btn.setTitle("Done", for: UIControlState.normal)
        btn.addTarget(self, action: #selector(doneBtnAciton(sender:)), for: UIControlEvents.touchUpInside)
        return btn
        
    }()
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}
